package com.study.ming.feign;

import com.study.ming.entity.WeatherPojo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author yh
 * @date 2022/10/12 13:38
 **/
//@FeignClient(name = "weather", url = "localhost:8082")
public interface WeatherFeign {

    @GetMapping("/getByCity")
    public WeatherPojo getWeatherByCity(@RequestParam(name="id", value = "id", required = false, defaultValue = "1") Integer id);
}
